// pages/userMsg/userMsg.js

Page({
  /*页面的初始数据*/
  data: {
    value: '',
    num: 0
  },
  /*生命周期函数--监听页面加载*/
  onLoad: function (options) {
    var that=this;
    that.setData({value:options.text})
  },
  // 用户留言
  input_value:function(e){
    var val = e.detail.value, num = e.detail.cursor;
    var that = this;
    that.setData({value: val, num: num})
  },
  // 
  confirm_msg:function(){
    var that = this,value=that.data.value;
    var pages = getCurrentPages();
    var prevPage = pages[pages.length - 2];
    //
    prevPage.setData({user_msg: value});
    wx.navigateBack({
      delta: 1
    });
  },
})